#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define RINGBUFFE_LEN 32

#define OK 0
#define ERROR -1
#define BUFFER_FULL_SIZE -2
#define LESS_LENGHT -3

typedef struct
{
	uint16_t Head;
	uint16_t Tail;
	uint16_t Lenght;
	uint16_t totalLenght;
	
	uint8_t Ring_Buff[RINGBUFFE_LEN];
}RingBuff_t;

int8_t RingBuf_Init(RingBuff_t* pRingBuff);
int8_t RingBuf_Btye_Wrie(RingBuff_t* pRingBuff, uint8_t data);
int8_t RingBuf_Byte_Read(RingBuff_t* pRingBuff, uint8_t* pDatas, uint8_t len);
